<%@ page import="TeachLesson.CourseWork.CourseWorkEnity" %>
<%@ page import="TeachLesson.CourseWork.CourseWorkDao" %><%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2020/8/25
  Time: 20:41
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>作业详细</title>
    <link href="/SystemerNav/SystemerNav.css" rel="stylesheet" type="text/css">
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
</head>
<%
    response.setCharacterEncoding("GBK");
    request.setCharacterEncoding("GBK");
    CourseWorkEnity courseWorkEnity=new CourseWorkEnity();
    CourseWorkDao courseWorkDao=new CourseWorkDao();
    int id=Integer.parseInt(request.getParameter("id"));
    courseWorkEnity=courseWorkDao.getCourseWork(id);
    String filePath="F:/JWGLXT/web/StuCourseWork/"+courseWorkEnity.getWorkerNo()+"/"+courseWorkEnity.getCourseNo()+"/"+courseWorkEnity.getId();
%>
<body background="/LoginInterface/loginFace.jpg">
<div class="container">
    <div class="top">
        <table class="table table-bordered">
            <tr>
                <td colspan="2">课程作业详细</td>
            </tr>
            <tr>
                <td>作业名</td>
                <td><%=courseWorkEnity.getTitle()%></td>
            </tr>
            <tr>
                <td>提交截至日期</td>
                <td><%=courseWorkEnity.getEndTime()%></td>
            </tr>
            <tr>
                <td>评分方式</td>
                <td><%=courseWorkEnity.getEvaluteType()%></td>
            </tr>
            <tr>
                <td>作业附件</td>
                <td><a href="/TeachLesson/downloadCourseWorkServlet?filePath=<%=courseWorkEnity.getFilePath()%>" target="_blank">相关资料下载</a> </td>
            </tr>
            <tr>
                <td>作业要求描述</td>
                <td><%=courseWorkEnity.getWorkDesc()%></td>
            </tr>
        </table>
    </div>
    <div class="bottom">
        <form action="/StudentLesson/AddCourseWorkServlet" enctype="multipart/form-data" method="post">
            <input type="hidden" name="workerNo" value="<%=courseWorkEnity.getWorkerNo()%>">
            <input type="hidden" name="courseNo" value="<%=courseWorkEnity.getCourseNo()%>">
            <input type="hidden" name="studentNo" value="<%=(String)session.getAttribute("studentNo")%>">
            <input type="hidden" name="filePath" value="<%=filePath%>">
            <input type="hidden" name="courseId" value="<%=courseWorkEnity.getId()%>">
            <label>作业提交</label>
            <div class="form-group">
                <label for="exampleInputFile">上传文件</label>
                <input type="file" id="exampleInputFile" name="t1">
                <p class="help-block">多文件上传可以提供压缩包</p>
            </div>
            <label>作业描述</label>
            <textarea class="form-control" rows="5" name="workDesc"></textarea>
            <button type="submit" class="btn btn-info">提交作业</button>
        </form>
    </div>
</div>
</body>
</html>
